A content delivery network (CDN) is a network of computers containing copies of data placed at various network nodes. A CDN provides an interface for data between origin servers and end user computers. Origin servers are the primary sources of content, and servers of the CDN cache copies of the content having the highest demand. The servers of the CDN may be strategically arranged to be closer to the end user computers than the origin servers. The end user computers can access the high-demand data at the servers of the CDN rather than having to access the data directly from the origin servers. As such, a CDN improves access to the data by increasing access bandwidth, increasing redundancy, and reducing access latency.
Bing® Maps provided by Microsoft Corporation of Redmond, Wash., is an example of an online application that provides content using a CDN. This application has a large amount of static content in the form of map tiles (images of portions of a map) stored in origin servers that is delivered to end-users via the CDN. For instance, a user may use a web browser to browse a map at their computing device, such as by panning across the map, zooming in or out of a portion of the map, etc. As the user browses the map, the browser transmits requests for new map tiles to the CDN.
Various techniques have been developed to enable content (e.g., map tiles) to be more rapidly provided to a web browser at the user computing device. According to a first technique, an origin server for an online application may predict future content requests. The predicted future content may be pre-cached in the CDN so that it can be accessed more quickly by the user computing device if the predicted future content is actually requested. According to a second technique, a client web browser at a user computing device may predict what content may be desired in the future, and may pre-fetch the content to the web browser. According to a third technique, a CDN server may predict future content requests by a user computing device, and may pre-cache the predicted future content in the CDN.
However, these techniques have disadvantages. For instance, having the origin servers predict future content has a disadvantage that the content to be pre-cached is determined in advance. With regard to pre-fetching content to a web browser, in cases where the user incurs a cost for data transfers or has limited bandwidth (such as in mobile applications), such pre-caching may not be acceptable and/or may not offer desirable performance. Furthermore, with regard to having the CDN predict and pre-cache future content, the CDN would have to be very sophisticated to understand the types of content requests that the CDN receives to be able to infer future content requests.
As such, current caching techniques are less than desirable. In the case of Bing® Maps, due to the number of map tiles that are available and the different focus areas of different users, the “cache hit’” ratio (ratio of requested data that is cached versus the total amount of available data) is undesirably low (e.g., less than 50%). This results in relatively high latency in map loading, because instead of retrieving the map tiles from cache at the CDN, the map tiles frequently have to be retrieved from the origin servers for the users.